/**
 * 
 */
package stc.skymobi.transport.closure;

import org.apache.commons.collections.Closure;

import stc.skymobi.transport.Sender;
import stc.skymobi.transport.TransportUtils;


/**
 * @author hp
 *
 */
public class EchoMessageClosure implements Closure {

	/* (non-Javadoc)
	 * @see org.apache.commons.collections.Closure#execute(java.lang.Object)
	 */
	public void execute(Object input) {
		System.out.println("try echo:" + input);
		Sender sender = TransportUtils.getSenderOf(input);
		if ( sender != null ) {
			sender.send(input);
		}
	}

}
